package com.autumn.mybatis.provider.sqlserver;

import com.autumn.mybatis.provider.AbstractProvider;
import com.autumn.mybatis.provider.ICommandBuilder;
import com.autumn.mybatis.provider.IDefinitionBuilder;
import com.autumn.mybatis.provider.IDeleteBuilder;
import com.autumn.mybatis.provider.IInsertBuilder;
import com.autumn.mybatis.provider.IUpdateBuilder;
import com.autumn.mybatis.provider.ProviderDriveType;
import com.autumn.mybatis.provider.sqlserver.builder.SqlServerCommandBuilder;
import com.autumn.mybatis.provider.sqlserver.builder.SqlServerDefinitionBuilder;
import com.autumn.mybatis.provider.sqlserver.builder.SqlServerDeleteBuilder;
import com.autumn.mybatis.provider.sqlserver.builder.SqlServerInsertBuilder;
import com.autumn.mybatis.provider.sqlserver.builder.SqlServerUpdateBuilder;

/**
 * Sql抽象驱动
 * 
 * @author 老码农
 *
 *         2017-12-06 13:24:36
 */
public abstract class AbstractSqlServerProvider extends AbstractProvider {

	protected SqlServerInsertBuilder insertBuilder;
	protected SqlServerUpdateBuilder updateBuilder;
	protected SqlServerDeleteBuilder deleteBuilder;
	protected SqlServerDefinitionBuilder definitionBuilder;
	protected SqlServerCommandBuilder commandBuilder;

	public AbstractSqlServerProvider() {
		this.insertBuilder = new SqlServerInsertBuilder(this);
		this.updateBuilder = new SqlServerUpdateBuilder(this);
		this.deleteBuilder = new SqlServerDeleteBuilder(this);
		this.definitionBuilder = new SqlServerDefinitionBuilder(this);
		this.commandBuilder = new SqlServerCommandBuilder(this);
	}

	@Override
	public IInsertBuilder getInsertBuilder() {
		return this.insertBuilder;
	}

	@Override
	public IUpdateBuilder getUpdateBuilder() {
		return this.updateBuilder;
	}

	@Override
	public IDeleteBuilder getDeleteBuilder() {
		return this.deleteBuilder;
	}

	@Override
	public IDefinitionBuilder getDefinitionBuilder() {
		return this.definitionBuilder;
	}

	@Override
	public int getConnectType() {
		return ProviderDriveType.SQLSERVER.getConnectType();
	}

	@Override
	public ICommandBuilder getCommandBuilder() {
		return this.commandBuilder;
	}
}
